package logic

import (
	"context"
	"hotel-app/common/proto/hotel"
	"hotel-app/service/server"
)

type ServerHotel struct {
	hotel.UnimplementedHotelServer
}

func (s ServerHotel) SendSms(ctx context.Context, in *hotel.SendSmsReq) (*hotel.SendSmsResp, error) {
	sms, err := server.SendSms(in)
	if err != nil {
		return nil, err
	}
	return sms, nil
}
func (s ServerHotel) UserLogin(ctx context.Context, in *hotel.UserLoginReq) (*hotel.UserLoginResp, error) {
	login, err := server.UserLogin(in)
	if err != nil {
		return nil, err
	}
	return login, nil
}
func (s ServerHotel) OrderList(ctx context.Context, in *hotel.OrderListReq) (*hotel.OrderListResp, error) {
	list, err := server.OrderList(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
func (s ServerHotel) OrderListByUser(ctx context.Context, in *hotel.OrderListByUserReq) (*hotel.OrderListByUserResp, error) {
	list, err := server.OrderListByUser(in)
	if err != nil {
		return nil, err
	}
	return list, nil
}
